ADD_DEFINITIONS(-DUNICODE -D_UNICODE )

SET(ATTEST_SOURCE_FILES
Assertable.cpp
Debug.cpp
DebugFactory.cpp
DebugConsole.cpp
Log.cpp
Test.cpp
TestCase.cpp
TestFactory.cpp
TestSuite.cpp
Testable.cpp
Writer.cpp
)


# settings for Microsoft Visual C++
IF(CMAKE_CXX_COMPILER MATCHES cl)
	IF(CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008")
		SET(CMAKE_CXX_FLAGS "/nologo /W3 /Gy /EHsc")
		SET(CMAKE_CXX_FLAGS_DEBUG "/MTd /ZI /Od")
		SET(CMAKE_CXX_FLAGS_RELEASE "/MT /O2")
	ENDIF(CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008")
ENDIF(CMAKE_CXX_COMPILER MATCHES cl)

IF(WIN32)
  SET(ATTEST_PLATFORM_DEFINE -DWIN32 -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE)
ELSEIF(APPLE)
  SET(ATTEST_PLATFORM_DEFINE -DAPPLE )
ENDIF(WIN32)

IF(CMAKE_BUILD_TYPE STREQUAL "Release")
	add_definitions(${ATTEST_PLATFORM_DEFINE} -DNDEBUG -DQT_NO_DEBUG)
ELSE()
	add_definitions(${ATTEST_PLATFORM_DEFINE} -DDEBUG -DQT_DEBUG)
ENDIF()

add_library (attest ${ATTEST_SOURCE_FILES} ${ATTEST_PLATFORM_SOURCE_FILES} )


